<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3"/>
<title>Duye SDK User Wizard: duye::XmlPrinter Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Duye SDK User Wizard
   &#160;<span id="projectnumber">V1.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>duye</b></li><li class="navelem"><a class="el" href="classduye_1_1_xml_printer.html">XmlPrinter</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classduye_1_1_xml_printer-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">duye::XmlPrinter Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Print to memory functionality. The GXmlPrinter is useful when you need to:  
 <a href="classduye_1_1_xml_printer.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="duye__xml_8h_source.html">duye_xml.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for duye::XmlPrinter:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classduye_1_1_xml_printer.png" usemap="#duye::XmlPrinter_map" alt=""/>
  <map id="duye::XmlPrinter_map" name="duye::XmlPrinter_map">
<area href="classduye_1_1_xml_visitor.html" title="Implements the interface to the &quot;Visitor pattern&quot; (see the Accept() method.) If you call the Accept()..." alt="duye::XmlVisitor" shape="rect" coords="0,0,105,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a9aafdfedf4e43fe16acf7ad050bb2a39"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9aafdfedf4e43fe16acf7ad050bb2a39"></a>
virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_xml_printer.html#a9aafdfedf4e43fe16acf7ad050bb2a39">visitEnter</a> (const <a class="el" href="classduye_1_1_xml_document.html">XmlDocument</a> &amp;doc)</td></tr>
<tr class="memdesc:a9aafdfedf4e43fe16acf7ad050bb2a39"><td class="mdescLeft">&#160;</td><td class="mdescRight">Visit a document. <br/></td></tr>
<tr class="separator:a9aafdfedf4e43fe16acf7ad050bb2a39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31307d01bbfe25b3e091576daf789c3f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a31307d01bbfe25b3e091576daf789c3f"></a>
virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_xml_printer.html#a31307d01bbfe25b3e091576daf789c3f">visitExit</a> (const <a class="el" href="classduye_1_1_xml_document.html">XmlDocument</a> &amp;doc)</td></tr>
<tr class="memdesc:a31307d01bbfe25b3e091576daf789c3f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Visit a document. <br/></td></tr>
<tr class="separator:a31307d01bbfe25b3e091576daf789c3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf576803cf6862f13cf3add428160b91"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaf576803cf6862f13cf3add428160b91"></a>
virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_xml_printer.html#aaf576803cf6862f13cf3add428160b91">visitEnter</a> (const <a class="el" href="classduye_1_1_xml_element.html">XmlElement</a> &amp;element, const <a class="el" href="classduye_1_1_xml_attribute.html">XmlAttribute</a> *firstAttribute)</td></tr>
<tr class="memdesc:aaf576803cf6862f13cf3add428160b91"><td class="mdescLeft">&#160;</td><td class="mdescRight">Visit an element. <br/></td></tr>
<tr class="separator:aaf576803cf6862f13cf3add428160b91"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af98341247a79474693d7d95370aae68c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af98341247a79474693d7d95370aae68c"></a>
virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_xml_printer.html#af98341247a79474693d7d95370aae68c">visitExit</a> (const <a class="el" href="classduye_1_1_xml_element.html">XmlElement</a> &amp;element)</td></tr>
<tr class="memdesc:af98341247a79474693d7d95370aae68c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Visit an element. <br/></td></tr>
<tr class="separator:af98341247a79474693d7d95370aae68c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf7908e7bb583fc2c522e122ef032e12"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaf7908e7bb583fc2c522e122ef032e12"></a>
virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_xml_printer.html#aaf7908e7bb583fc2c522e122ef032e12">visit</a> (const <a class="el" href="classduye_1_1_xml_declaration.html">XmlDeclaration</a> &amp;declaration)</td></tr>
<tr class="memdesc:aaf7908e7bb583fc2c522e122ef032e12"><td class="mdescLeft">&#160;</td><td class="mdescRight">Visit a declaration. <br/></td></tr>
<tr class="separator:aaf7908e7bb583fc2c522e122ef032e12"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a106dc0a8dcd53aa8b5d8164a52d7a7ca"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a106dc0a8dcd53aa8b5d8164a52d7a7ca"></a>
virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_xml_printer.html#a106dc0a8dcd53aa8b5d8164a52d7a7ca">visit</a> (const <a class="el" href="classduye_1_1_xml_text.html">XmlText</a> &amp;text)</td></tr>
<tr class="memdesc:a106dc0a8dcd53aa8b5d8164a52d7a7ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Visit a text node. <br/></td></tr>
<tr class="separator:a106dc0a8dcd53aa8b5d8164a52d7a7ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55f2c675e02d1b527e09c5fde2c81827"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a55f2c675e02d1b527e09c5fde2c81827"></a>
virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_xml_printer.html#a55f2c675e02d1b527e09c5fde2c81827">visit</a> (const <a class="el" href="classduye_1_1_xml_comment.html">XmlComment</a> &amp;comment)</td></tr>
<tr class="memdesc:a55f2c675e02d1b527e09c5fde2c81827"><td class="mdescLeft">&#160;</td><td class="mdescRight">Visit a comment node. <br/></td></tr>
<tr class="separator:a55f2c675e02d1b527e09c5fde2c81827"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab53beeaf2a530995c6da3f0ef75df4f0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab53beeaf2a530995c6da3f0ef75df4f0"></a>
virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_xml_printer.html#ab53beeaf2a530995c6da3f0ef75df4f0">visit</a> (const <a class="el" href="classduye_1_1_xml_unknown.html">XmlUnknown</a> &amp;unknown)</td></tr>
<tr class="memdesc:ab53beeaf2a530995c6da3f0ef75df4f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Visit an unknown node. <br/></td></tr>
<tr class="separator:ab53beeaf2a530995c6da3f0ef75df4f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1225526922f05fb86601f3b8fb2981a2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1225526922f05fb86601f3b8fb2981a2"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_xml_printer.html#a1225526922f05fb86601f3b8fb2981a2">setIndent</a> (const char *<a class="el" href="classduye_1_1_xml_printer.html#a90ca4b079079665c7396a1356825773b">indent</a>)</td></tr>
<tr class="memdesc:a1225526922f05fb86601f3b8fb2981a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the indent characters for printing. By default 4 spaces but tab () is also useful, or null/empty string for no indentation. <br/></td></tr>
<tr class="separator:a1225526922f05fb86601f3b8fb2981a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90ca4b079079665c7396a1356825773b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a90ca4b079079665c7396a1356825773b"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_xml_printer.html#a90ca4b079079665c7396a1356825773b">indent</a> ()</td></tr>
<tr class="memdesc:a90ca4b079079665c7396a1356825773b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Query the indention string. <br/></td></tr>
<tr class="separator:a90ca4b079079665c7396a1356825773b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9953783b2bfdafa33f0587d71094e411"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9953783b2bfdafa33f0587d71094e411"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_xml_printer.html#a9953783b2bfdafa33f0587d71094e411">setLineBreak</a> (const char *<a class="el" href="classduye_1_1_xml_printer.html#a4ef083d20db1bc2c824953eef8ecb7ab">lineBreak</a>)</td></tr>
<tr class="memdesc:a9953783b2bfdafa33f0587d71094e411"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the line breaking string. By default set to newline (<br/>
). Some operating systems prefer other characters, or can be set to the null/empty string for no indenation. <br/></td></tr>
<tr class="separator:a9953783b2bfdafa33f0587d71094e411"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ef083d20db1bc2c824953eef8ecb7ab"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4ef083d20db1bc2c824953eef8ecb7ab"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_xml_printer.html#a4ef083d20db1bc2c824953eef8ecb7ab">lineBreak</a> ()</td></tr>
<tr class="memdesc:a4ef083d20db1bc2c824953eef8ecb7ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Query the current line breaking string. <br/></td></tr>
<tr class="separator:a4ef083d20db1bc2c824953eef8ecb7ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae5f1b73e8dee46adf7783fcbcaa50292"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae5f1b73e8dee46adf7783fcbcaa50292"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_xml_printer.html#ae5f1b73e8dee46adf7783fcbcaa50292">setStreamPrinting</a> ()</td></tr>
<tr class="memdesc:ae5f1b73e8dee46adf7783fcbcaa50292"><td class="mdescLeft">&#160;</td><td class="mdescRight">Switch over to "stream printing" which is the most dense formatting without linebreaks. Common when the XML is needed for network transmission. <br/></td></tr>
<tr class="separator:ae5f1b73e8dee46adf7783fcbcaa50292"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab1c55909aaa1908f0610ec62e09b1864"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab1c55909aaa1908f0610ec62e09b1864"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_xml_printer.html#ab1c55909aaa1908f0610ec62e09b1864">cStr</a> ()</td></tr>
<tr class="memdesc:ab1c55909aaa1908f0610ec62e09b1864"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the result. <br/></td></tr>
<tr class="separator:ab1c55909aaa1908f0610ec62e09b1864"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab45cbd7e9be2abb08005b7fce76c7aa2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab45cbd7e9be2abb08005b7fce76c7aa2"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_xml_printer.html#ab45cbd7e9be2abb08005b7fce76c7aa2">size</a> ()</td></tr>
<tr class="memdesc:ab45cbd7e9be2abb08005b7fce76c7aa2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the length of the result string. <br/></td></tr>
<tr class="separator:ab45cbd7e9be2abb08005b7fce76c7aa2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6d2731c379d377e4f5b67e9f781bbc9c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6d2731c379d377e4f5b67e9f781bbc9c"></a>
const std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classduye_1_1_xml_printer.html#a6d2731c379d377e4f5b67e9f781bbc9c">str</a> ()</td></tr>
<tr class="memdesc:a6d2731c379d377e4f5b67e9f781bbc9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the result. <br/></td></tr>
<tr class="separator:a6d2731c379d377e4f5b67e9f781bbc9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Print to memory functionality. The GXmlPrinter is useful when you need to: </p>
<ol type="1">
<li>Print to memory (especially in non-STL mode)</li>
<li>Control formatting (line endings, etc.)</li>
</ol>
<p>When constructed, the GXmlPrinter is in its default "pretty printing" mode. Before calling Accept() you can call methods to control the printing of the XML document. After XmlNode::Accept() is called, the printed document can be accessed via the CStr(), Str(), and Size() methods.</p>
<p>GXmlPrinter uses the Visitor API. </p>
<pre class="fragment">* GXmlPrinter printer;
* printer.SetIndent( "\t" );
* 
* doc.Accept( &amp;printer );
* fprintf( stdout, "%s", printer.CStr() );
* </pre> </div><hr/>The documentation for this class was generated from the following file:<ul>
<li>Z:/duye/src/duyebase/utils/<a class="el" href="duye__xml_8h_source.html">duye_xml.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Feb 27 2017 15:19:23 for Duye SDK User Wizard by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.3
</small></address>
</body>
</html>
